/*
 * Created by Lettle on 2022/3/19.
 * QQ: 1071445082
 * github: https://github.com/Python-Lettle
 * gitee : https://gitee.com/lettle/
 */
#ifndef COT_ERROR_H
#define COT_ERROR_H

#define COMPILE_WARNING_FMT "%s(line:%d) : Compiling Warning: %s!\n"
#define COMPILE_ERROR_FMT "%s(line:%d) : Compiling Error: %s!\n"
#define LINKING_ERROR_FMT "Linking Error: %s!\n"

/* 错误级别 */
enum e_ErrorLevel
{
    LEVEL_WARNING,
    LEVEL_ERROR,
};

/* 工作阶段 */
enum e_WorkStage
{
    STAGE_COMPILE,
    STAGE_LINK,
};

void warning(char *fmt, ...);
void error(char *fmt, ...);
void expect(char *msg);
void skip(int c);
void link_error(char *fmt, ...);

#endif //COT_ERROR_H
